<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>创建虚拟 DOM 对象 - JSX</title>
</head>
<body>
    <div id="root"></div>

    <script src="../js/react.development.js"></script>
    <script src="../js/react-dom.development.js"></script>
    <script src="../js/babel.min.js"></script>

    <script type="text/babel">
        // 1. jsx 创建虚拟 DOM
        // var vDOM = <div>我是一个虚拟 DOM 对象哦</div>;
        var vDOM = <div>
                <h2>喜悦整容 - <span>惊爆打人事件</span></h2>
                <p>某城市, 顾客整容失败, 被非法拘禁, 还遭殴打!!</p>
            </div>

        //2. 渲染
        ReactDOM.render(vDOM, document.querySelector('#root'));
    </script>
</body>
</html>